module.exports = app => {
    const { STRING, DATE, BIGINT, INTEGER } = app.Sequelize;
    const User = app.model.define("type", {
        id: {
            type: BIGINT(11),
            autoIncrement: true,
            primaryKey: true,
            unique: true
        },
        name: STRING(30),
        sort: {
            type: BIGINT(11),
            defaultValue: 999
        },
        status: {
            type: INTEGER,
            defaultValue: 1
        },
        created_at: DATE,
        updated_at: DATE,
    }, {
        timestamps: true, // 自动维护时间戳 [ created_at、updated_at ]
        createdAt: 'created_at',
        updatedAt: 'updated_at',
        deletedAt: false, // 'deleted_at',
        paranoid: false
    });
    return User;
};